package View.Menu;

import java.awt.Graphics;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JButton;
import javax.swing.JPanel;

import Utils.ConstantsImplement;

public class MenuControlsPanel extends JPanel implements ConstantsImplement{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private BufferedImage imageBackground;
	private JButton back_;

	public MenuControlsPanel() {
		this.setLayout(null);
		// TODO Auto-generated constructor stub
		try {
			imageBackground = ImageIO.read(new File("src/Image/Controls.png"));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		back_ = new JButton();
		back_.setLocation(150, 450);
		back_.setSize(MENU_BUTTON_RATE_W, MENU_BUTTON_RATE_H);
		back_.setText("Back");		
		this.add(back_);

	}
	
	public void addBackActionListener(ActionListener actionListener){
		back_.addActionListener(actionListener);
	}
	
	@Override
	protected void paintComponent(Graphics g) {
		// TODO Auto-generated method stub
		super.paintComponent(g);
		g.drawImage(imageBackground, 0, 0, getWidth(), getHeight() ,this);
	}

}
